package com.mes.cloud.web;

import com.mes.cloud.api.dto.request.position.SysPositionChannelTypeRequest;
import com.mes.cloud.api.dto.response.position.SysPositionChannelTypeDto;
import com.mes.cloud.common.JsonResult;
import com.mes.cloud.service.SysPositionChannelTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xy
 * @version 2019-08-06 16:39:01
 * @email yuan.xue3@pactera.com
 */
@Api(tags = "岗位客户类型中间表", value = "岗位客户类型中间表接口")
@RestController
@RequestMapping(value = "/sysPositionChannelType")
public class SysPositionChannelTypeController  {

    private SysPositionChannelTypeService sysPositionChannelTypeService;

    @Autowired
    public SysPositionChannelTypeController(SysPositionChannelTypeService sysPositionChannelTypeService) {
        this.sysPositionChannelTypeService = sysPositionChannelTypeService;
    }

    /**
     * 功能: 岗位客户类型中间表查询所有
     *
     * @param sysPositionChannelTypeRequest
     * @return JsonResult<List<SysPositionChannelTypeDto>>
     */
    @ApiOperation(value = "岗位客户类型中间表查询所有", notes = "岗位客户类型中间表查询所有")
    @PostMapping(value = "/list")
    public JsonResult<List<SysPositionChannelTypeDto>> list(@RequestBody SysPositionChannelTypeRequest sysPositionChannelTypeRequest) {
        return sysPositionChannelTypeService.list(sysPositionChannelTypeRequest);
    }
}
